Skip to content

Fix sweep node wallets job to return errors without clear reason - #580

Merged
imclvr merged 1 commit into
mainfrom
fix/fix-sweep-node-wallets-error-without-reason
Aug 27, 2026
Merged

Fix sweep node wallets job to return errors without clear reason#580
imclvr merged 1 commit into
mainfrom
fix/fix-sweep-node-wallets-error-without-reason

Conversation

@imclvr

@imclvr imclvr commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
        _logger.LogError("Error while funding sweep transaction reason: {Reason}", reason)

There're many error traces in prod without a clear reason. After looking at the code, looks like we were missing one particular case which seems to be a quite frequent one.

@imclvr
imclvr requested review from Jossec101, RodriFS and manumonti and a lite review from Copilot August 26, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves observability for SweepNodeWalletsJob by ensuring the job logs a non-empty, actionable reason when it decides not to fund/broadcast a sweep transaction—addressing production error traces where {Reason} was previously empty.

Changes:

  • Replaces an inline nested-conditional “reason” builder with a dedicated helper method.
  • Adds a default/fallback reason message for the previously-unhandled “below sweep threshold” case, preventing empty {Reason} logs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Jobs/SweepNodeWalletsJob.cs Outdated
manumonti
manumonti previously approved these changes Aug 27, 2026

@manumonti manumonti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!! 🙌

@imclvr
imclvr force-pushed the fix/fix-sweep-node-wallets-error-without-reason branch from 9edac1c to 2385ea3 Compare August 27, 2026 07:07
Comment thread src/Jobs/SweepNodeWalletsJob.cs
@imclvr
imclvr force-pushed the fix/fix-sweep-node-wallets-error-without-reason branch from 2385ea3 to cd124ba Compare August 27, 2026 08:23
@imclvr
imclvr enabled auto-merge August 27, 2026 08:23
@imclvr
imclvr merged commit 44220a0 into main Aug 27, 2026
5 checks passed
@imclvr
imclvr deleted the fix/fix-sweep-node-wallets-error-without-reason branch August 27, 2026 08:25
markettes pushed a commit that referenced this pull request Aug 28, 2026
…-without-reason

Fix sweep node wallets job to return errors without clear reason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants